package com.openjava.example.order.service.fallback;

import com.openjava.example.order.domain.ExampleOrder;
import com.openjava.example.order.service.ExampleOrderClient;
import org.ljdp.component.result.BasicApiResponse;
import org.springframework.stereotype.Component;

//@Component
public class ExampleOrderHystric implements ExampleOrderClient {
    @Override
    public ExampleOrder get(Long id){
        ExampleOrder order = new ExampleOrder();
        order.setCode(3000);
        order.setMessage("服务器繁忙");
        return order;
    }

    @Override
    public BasicApiResponse hi(){
        BasicApiResponse response = new BasicApiResponse();
        response.setCode(3000);
        response.setMessage("服务器访问不了");
        return response;
    }
}
